Main Help Index
CT-Shell for Windows

  Version 2.21    Main Help Index

Click on any of these entries to jump immediately to that section of the help file.  Having done that, you can use the browse keys to look through a series of related items.

CT-Shell Features:

Capabilities

Menu Orientation:

CT Menu Basics

CTSHELL.INI

Keywords

Items

Directories

Autoexec

Load= and Run=

Creating Menu Entries:

User Entries

Alarm Entries

Operation Overview:

The CT-Shell Main Window

Menu

Function Keys

Current File/Tagged Files

F1  Toggle Current File

F2  Tag All Files

F3  Untag all Files

F4  Invert Tags

F5  Tag By Name

F6  Original Path

F7  Reload Menu

F8  Print File(s)

F9  Pickup Files

F10  Surrender Files

F11  Lose Files

F12  Packing List

Esc  Parent Directory

Shift + Enter = Command Line

Status Display

Current Path

Dealing with Files:

Files Window

Deleting Files

<Volume>  VolumeName

Name

Size

Date

Time

Attributes

Read/only

Hidden

System

Directory

Archive

Changing Attributes

Disk Drive Display

Extended Selections

Doubleclicking Entries

Status Line

Command Line Interface:

The CT-Shell Command Line

DOS Commands

Persistent Command Line

Run Mode

Command Recall

The CT-Shell INI File:

CTSHELL.INI Reference

Accessing CTSHELL.INI

Options Dialogs

[Alarm]

[Autoexec]

[Color]

[Editor]

[Modem]

[Options]

AllowDial

Beep

CTCaption

EncryptKey

FindCaseSensitive

FindWholeWord

FlexSize

IgnoreDrives

KeepOpen

Log Active

LogFilePath

LowResources

Mail_In and Mail_Out

OldShell

RequireConf

ShareTime

ShrinkOnRun

SortMethod

StartX and StartY

TabSize

User1 through User12

VisualBeep

WinClose

[Phones]

[Printer]

LineSize

MarginSize

BodyFont

HeadFont

24Hour

Draft

Headings

HeaderPage

Independent

LineNums

OddEven

PageNums

Ruler

TextBold

[Items]

Menu Items

ItemName

Pop-up Entries

EntryName

DirPath

ExePath

Switches

Keyword

Reference to Keywords:

CT-Shell Keywords

Single and Tagged Files

About

Alarm

Attrib

ByName

Command

Config

Copy

Deldir

Deliver

Delete

DelLog

DeTab

DirSize

EditIni

EditLog

Encrypt

Entab

Examine

Exit

Extensions

FileClip

FileInfo

Find

Fonts

FullScreen

FormFeed

Help

Hide

Home

Icon

Invert

IsClip

LineCount

Load

LoadIni

Lose

Mail

Maximize

Move

MoveHere

Normal

OrigPath

Packing

Phone

PickUp

Position

Prefer

PrevIni

Print

PrintClip

Printer

PrintList

PrintUnf

Reboot

Reload

Remove

Rename

Resource

Restart

Run

SetDate

Shred

SysDate

Surrender

System

TagAll

Touch

Untag

Uninstall

Where

Tagged

Tattrib

Tcopy

Tdelete

Tdetab

Tentab

Tencrypt

TlineCount

Tmove

TprintUnf

Tshred

Ttouch

CT-Shell Batch Files:

Batch File Overview

Synchronicity

Reference to CT-Shell Commands:

CT-Shell Internal Commands

About

Alarm

CD

Config

Copy

Date

Del

DelDir

DelLog

DeTab

DirSize

Encrypt

EnTab

Exec

Exit

Export

Extensions

Find

FormFeed

Help

Home

Import

IsClip

LineCount

LoadIni

Mail

MD

Move

OrigPath

Phone

Prefer

PrevIni

Print

PrintClip

Printer

RD

Reboot

Resource

Restart

Shred

System

Time

Touch

UnInstall

Update

Where

Reference to Field Characters:

Special Field Characters

Object-Oriented Substitution

!

~

#

@

?argument?

%variable%

;  Comments

Registration Information:

Shareware Distribution


How to Register CT-Shell
ShareWare Registration

CT-Shell is Copyright © 1990-1992 Jerry Houston and Computer Training, All Rights Reserved.  It is distributed as ShareWare, and you are free to use it on an evaluation basis for up to 30 days.  At the end of that time you must either register your copy (that means paying for it), or discontinue using it.

Although CT-Shell is not crippled in any way, registration brings you more than just a clean conscience.  You receive a 100+ page professionally printed manual with copious illustration, toll-free (800) support, the latest revision of the program, and an opportunity to beta test new versions, if you're so inclined.

You'll receive a special personalized SoftKey file that will "unlock" future versions of CT.  That way, any new versions that you may obtain from a BBS or a shareware distributor will automatically become "registered" as soon as they appear on your computer.

The cost is $35, in US funds, drawn on a North American bank, and includes postpaid shipment  within the US, Canada and Mexico.  An extra charge is made for shipping only when it is necessary for overseas shipment.

Commercial purchases of five or more copies qualify for a site license at an attractive cost.  Please call first, if you're in that category.  To help us keep track of your order,  please complete the information requested in CTREGIST.DOC, and mail it with your payment to:

Computer Training

13215 NE 123 ST, Ste 114

Kirkland, WA  98034-8032

If you have questions before registering CT, please call at our regular number:

(206) 820-6859.

To all who have already registered:  Thank you - it's working!  With your support and encouragement we're able to continue offering high-quality nag-free shareware!


Features and Capabilities
Capabilities

CT is a small, convenient and fast:

•  Program launcher  (to replace ProgMan)

•  Windows batch file processor

•  File manager  (to replace FileMan)

•  Command line interface and DOS command processor

(to replace the MS DOS executive)

•  Event scheduler and alarm clock

•  Phone database and automatic dialer

•  Menuing system, user configurable

•  Autoexec facility for Windows

•  (Source) file listing utility

•  Font listing utility

•  String search utility

•  File finding utility

•  Programmer's helper for all languages

•  Resource monitor

•  File encryption system


Menu Basics
CT Menu Basics

CT is quite configurable; in fact, every entry in the menu that you see when you run the program is defined in the CTSHELL.INI file, and you can change any of them or add more entries, to suit your needs.  Likewise, all the function key assignments that you see at the left side of the main CT window are user-definable.  You can reassign any or all of them, so you can start your most frequent tasks just by pressing a key.


The CT-Shell INI File
CTSHELL.INI

Besides menu entries, the CTSHELL.INI file contains values for the many options that CT relies on for its various features.  Phone numbers are stored there for its directory/dialer, preferences are stored there, and configuration options such as those that specify how program listings are printed.  However, the most significant features in CTSHELL.INI are the entries that define the menus, the [Autoexec] section, and the [User] options.  They are all similar in construction, they all contain five sets of braces, and look like these examples:

Generic form:

{EntryName} {DirPath} {ExePath} {Switches} {Keyword}

Example:

{NOTEPAD Editor} {} {notepad.exe} {!} {}

In this first example, the name that will show up in the menu is NOTEPAD Editor.  Running that program doesn't require changing to a different directory, so the second set of braces is left empty.

The third set of braces contains the name of the program to execute - in this case, it's notepad.exe.  The fourth set of braces contains any switches, or arguments that you need to pass to the program when it runs.  Here, the exclamation point is a special CT-Shell field character that indicates we want to edit the current file, the file that is highlighted in CT-Shell's list of all files in this directory.

Finally, the fifth set of braces is left empty, because this command doesn't require a special CT keyword.  (You'll see how one of those is used in the third example, below.)

To edit a specific file every time - such as to create a menu entry that allows you to edit MYFILE.TXT any time you want to - you would simply replace that exclamation point with the full path name of the file you want to edit.  For example, it might be done like this:

{Edit MYFILE.TXT} {} {notepad} {c:\windows\myfile.txt} {}

In addition to what you've seen so far, you can send a list of all the tagged files to a program that accepts multiple filename arguments by putting a pound sign in that field, such as {#}.  (Some people call that a number sign.  It's the Shift+3 key on your computer keyboard.

If you run a program in a different directory, and pass it the name of a file from the current directory, you will almost certainly need to pass it the complete path/file name.  Otherwise, the program would assume that the file exists within its current directory.  You can use the tilde (~) in place of the exclamation point to send the whole path.

Finally, if you need your command line to include the base filename (of the current file) without its extension, you can specify that with the commercial at-sign (@}.


CT-Shell Keywords
Keywords

Many of the features that CT makes available are based on special keywords that are often used instead of running external programs.  They are implemented this way to give you complete freedom in redesigning your menu system.

Most entries that use a keyword do not use any of the other fields, except the first.  The one shown below activates the dialog that allows you to change your preferences - those settings that affect how CT does certain things:

{Set Preferences} {} {} {} {PREFER}

CT keywords may be used in uppercase, lowercase, or mixed case.   There are just a few CT keywords that are used with executable programs.  They include:

•	 ICON and LOAD (which are synonyms), which cause the program to be run as an icon, as it would if it were listed in the  LOAD=  entry in your WIN.INI file.

•	FULLSIZE and MAXIMIZE (which are synonyms) cause a program to be run in the maximized - full size - state.

•	RUN and NORMAL cause a program to be run normal size, as in the  RUN=  entry in your WIN.INI file.

For completeness, the keywords NORMAL and RUN were included, although they're the default if none of the others is used.

The next example shows how you could create a menu entry that would load NOTEPAD, feed it the current file, and install it as an icon, ready to be used at any time:

{Edit CTSHELL.INI} {} {notepad.exe} {!} {ICON}


Defining Menu Items
Items

Since command-line arguments can be supplied for the programs that are run, we can have entries to allow us to use the NOTEPAD editor to edit various files, such as the configuration and system files that Windows and CT use.  Using the same techniques, you'll be able to create entries that run any of the programs you use on a day-to-day basis from the menu in CT.

Although the external programs in the sample CTSHELL.INI file have been chosen as ones that every Windows user is likely to have, don't get the impression that you can run only Windows programs from within CTSHELL.  You'll be able to make any program that you can run from within Windows a part of your menu, including DOS applications.


Changing Directories
Directories

A menu entry that is intended just to change to another directory usually has an entry name in the first field, a directory designation in the second field, and nothing in the remaining three fields.  Here's another example, which would change you to a directory with the path C:\WINDOWS\PIF, perhaps a place where you might store all the PIF files for your system.

{PIF Directory} {C:\WINDOWS\PIF} {} {} {}


Autoexec Feature
Autoexec

Near the beginning of your CTSHELL.INI file, you'll see an area marked [AUTOEXEC], that contains an empty set of braces, like this:

{} {} {} {} {}

The set of five empty braces is provided for your convenience.  If you have a number of items to be entered in the Autoexec section, you may find it convenient to copy that line of braces several times with your editor, then fill in the fields as needed.

In this area you can place entries that will load or run programs automatically when CT is started.  Because any number of entries can be placed here , and because command-line arguments may be provided using all of CT-Shell's powerful features (many of which you haven't seen yet), this feature of CT far exceeds the usefulness of the LOAD= and RUN= lines in your WIN.INI file.  Here is where you're most likely to use the ICON or LOAD keywords:

{Calculator} {} {calc.exe} {} {ICON}

People often work with a particular set of applications when they use their computers, and if that applies to you, you'll probably want to customize this section to load your most-often-needed applications whenever you start CT.  If you understand it well enough already, go ahead and install another program or two in the Autoexec section while you're here.

This section can contain entries to change to a startup directory, or to invoke CT keywords, as well as running external programs.  For example, you can start CT with its resource monitor in effect with an entry like this in your [AUTOEXEC] section:

{} {} {} {} {RESOURCE}


Load= and Run= from WIN.INI
Load= and Run=

In addition to its own - more powerful - Autoexec  feature, CT-Shell will process the LOAD= and RUN= lines that you may already have in your WIN.INI file.  Thus, if you install CT as your primary Windows shell (in place of ProgMan, for example), you'll find that those existing programs are still run at startup, just as before.


Assigning User Entries to Function Keys
User Entries

The only real difference between these entries and the ones in your [ITEMS] section is the way the assignments are made to the specific functions, and this is one of only two places where you'll use entries like this.  For anyone who is reading this without the CTSHELL.INI file open in an editor, here's what some of those entries look like in the default configuration:

Example 8:

User1={Toggle Current} {} {} {} {TOGGLE}

User2={Tag All} {} {} {} {TAGALL}

User3={Untag All} {} {} {} {UNTAGALL}

User4={Invert Tags} {} {} {} {INVERT}

. . .

These user-supplied settings allow someone to press F1, for example, to change whether the current file name (in the list box to the right) is selected (also called "tagged"), or to press F2 to tag all the files in the directory.


Alarm Entries - Event Scheduling
Alarm Entries

Moving all the way back to the beginning of the CTSHELL.INI file, you'll see a section called [ALARMS], which contains settings that control up to ten event timers that CT provides.  You can configure CT to run a backup program at quitting time, for example, or run a communication program to call a remote system and download a packet of email or database files late at night, when the phone rates are lowest.

You will notice that this section contains some entries that look a lot like the ones for user entries but they're used here as events that are to be executed at a preset time.  Normally you would change these settings by selecting a menu entry that invokes the special ALARM keyword, but you could also change them here with an editor, if you prefer that.   More details are provided about this in Chapter 5 and Chapter 6 of the user manual.


The CT-Shell Main Window

The CT-Shell main window contains a number of smaller special-purpose windows.  Each of them is described under a separate heading.  You can use the browse buttons to scroll through these sections.


The CT-Shell Menu Bar
Menu Bar

When CT is run, at the top of its main window is a menu that shows several items, such as File, Edit, Clipboard, Dirs, and more.  This menu is based on the entries in the CTSHELL.INI file, and you will later want to revise the sample file to include your own program choices.  As you add entries to your CTSHELL.INI file, those new options will appear in the CT menu, and you'll be able to select them from within the program.


Default Function Key Assignments
Function Keys

All of the function keys have pre-assigned meanings, based on entries in the [OPTIONS] section of the default CTSHELL.INI file that comes with CT.  All of them may be reassigned by the user, allowing you to customize your CT setup as you see fit.

The following sections describe the default settings for the function keys, based on entries in the supplied sample CTSHELL.INI file.


Current and Tagged File Operations
Current File/Tagged Files

Much of what CT does with files can be done either with a current file or with a set of tagged files.  When a file is tagged, its entry in the files list at the right is highlighted, letting you know that it has been selected for an operation.  The first five function keys are devoted to managing those file tagging operations, by default.

As you read this explanation of the function keys, feel free to try them out by tagging and untagging the files in your current directory.  You won't cause anything to happen to those files just by doing that, and it's easier to understand the process if you see it happen, rather than just reading about it.


Toggle Current File
F1  Toggle Current File

Toggles the tagged/untagged condition of the current file.  If, for any operation, you want to be sure that no files are tagged, you can turn off the tag for the current file by pressing F1.


Tag All Files
F2  Tag All Files

Tags all the files (but not directories or drives) that are in the files listing to the right.  You can perform a variety of operations on a set of tagged files, such as to copy them all somewhere, delete them all, etc., and this keypress tags them all.


Untag All Files
F3  Untag all Files

Untags all the files, regardless of how many were tagged, or how they got that way.


Invert File Tags
F4  Invert Tags

Inverts all the tags.  You might want to tag some of the files in the current directory, copy those tagged files to a floppy disk in drive A:, then copy the rest of the files in that directory to somewhere else.  F4 will tag all the previously untagged files, and untag the ones that were tagged.


Tag Files by Name
F5  Tag By Name

Tags by name.  If you want to copy all the EXE and COM files from the current directory to a floppy disk, you could press F5 once, specify *.EXE when CT asks you for a wildcard filespec, finish the process, then do it again and specify *.COM.


Change to Original Path
F6  Original Path

Returns you to the original path where CT was first started.  As you work with the program, you will have many reasons to change to other drives and/or directories.  F6 will always return you to your starting point.  Thus, you will want to consider starting CT-Shell in a "main" directory, such as the one in which you're working on a current project.


Reload CT-Shell's Menu
F7  Reload Menu

Reloads the menu.  You can easily customize your CTSHELL.INI file with an ordinary text editor.  After you make your modifications, you can simply press F7 to load the new version, without needing to restart CT (and possibly also Windows).


Print One or More Files
F8  Print File(s)

Will print a formatted and (optionally) line-numbered listing of the current or tagged files.  (Note that this description uses the term listing as it is commonly used in computer jargon,  to refer to a printed hard-copy version of the file contents.  It does not mean a list of the files in the directory.)


Pickup Files for Delivery
F9  Pickup Files

Places the currently selected files (possibly a single file) into the Packing List, which allows you to carry those files to another directory.  You have the option to copy them to that destination and elsewhere, or to move them there, which also deletes them from their original location.

You can pickup files from multiple locations, each time adding them to the packing list, allowing you to collect an assortment of files from any number of directories on various disk drives.


Surrender Files to Current Directory
F10  Surrender Files

Surrenders the files you are carrying to the current directory.  This removes them automatically from your packing list, and assumes that you don't want to copy them to any additional locations.

If you have in mind placing the same collection of files in more locations, instead use the Deliver entry in your Pickup/Deliver menu.  An assumption is made in the default setup that most people will want to surrender files most of the time, in the course of ordinary disk maintenance.


Lose Files that were Picked Up
F11  Lose Files

Loses the files currently in your packing list.  Use this option to clear out your packing list after delivering files to all the locations where you want them, or simply to clear it out if you change your mind about moving the ones you've picked up.


Display Packing List of Files
F12  Packing List

While the caption bar at the top of your main CT-Shell window will tell you how many files you're carrying around, this option will present a list of those files.


Change to Parent Directory
Esc  Parent Directory

The escape key is used to change to the parent directory.  So that the same operation is easy to accomplish with the mouse, the Esc key is represented on the screen along with the function keys.


Start CT-Shell Command Line Session
Shift + Enter = Command Line

Not a function key, this is a screen-oriented way to open up the CT command line, a place where you can type commands to be run by CT, Windows, or the DOS command processor.  Besides the representation on the screen (which can be mouse-clicked), another way to open the command line is with the Shift + Enter keypress.


Display of Memory, Time, Date
Status Display

Below the listing of the function keys is a small window that displays the current date and time, the amount of RAM that is available (including virtual memory if you're running Windows in Enhanced 386 mode) and how much room is left on the current disk drive.  The latter two measurements are displayed in megabytes, to the nearest one-hundredth, unless either one drops below one megabyte.  If that happens, its display changes to kilobytes instead.


Display of Current Path
Current Path

Just under the menu bar, and above the files display window, is the current path.  As you navigate around your disk drive, you can glance here to discover quickly where you are.  Watch this as you press Esc to move up in your directory tree, and as you press F6 to return to your starting point.

You can also click the mouse on any part of the path that's displayed, and you'll change immediately to that directory.


Files Display Window
Files Window

Files are displayed in sorted order, based on your choice of file name, file extension, or file date and time (with the newest files at the top of the list).  The sorting order can be changed permanently in your Preferences dialog, so that CT always starts with the files sorted the way you prefer.

There is also a keyboard shortcut that can be used to change the order for the duration of a single CT session (or until you change it again).  Changing the sorting order from the keyboard does not change the option in your CTSHELL.INI file - to do that you must change it in Preferences and save the new option.

To change the order from the keyboard, just press the number key that corresponds to these choices:

1  -  sort by file name

2  -  sort by file extension

3  -  sort by date/time

4  -  sort by size

If you sort by extension, date/time, or size, all files within a group will be displayed in file name order.

Operations that affect the files are all explained in their individual sections.


Deleting Files

If you press the Delete key, one or more tagged files can be deleted.  You are prompted for confirmation before that happens.


Name of Disk Drive Volume
<Volume>  VolumeName

Each disk drive may have one (and only one) optional volume name that identifies that disk in an operation such as a DOS DIR command.  If there is a volume label present, it must be in the root directory of that drive.


Directory and File Names
Name

Directory names are displayed in uppercase, to distinguish them from file names.  The filename extension, if any,  is included in this field.  In addition, following the directory and file listings, the name field will display the various disk drives that are available on the system.


File Size
Size

The size in bytes of the file is shown here.  You are also able to find out how many total bytes are included in a set of files that have been tagged, by using one of the special CT keywords, TAGGED, which is explained in another section.  This keyword is implemented in the sample CTSHELL.INI file in the Tagged menu item, and called Files Tagged.


Date When File Last Changed
Date

The date when a file was last modified (created or updated) is shown using the conventional mm/dd/yy format.  Both the time and the date for a file or a group of tagged files can be changed using the CT keyword, SETDATE.  This keyword is implemented in the sample CTSHELL.INI file in the Tagged menu item, and called Set File Date/Time.


Time When File Last Changed
Time

CT displays the file's creation time in its full resolution, which is to within two seconds.  DOS displays only hours and minutes when you use its DIR command, although the number of seconds (to the nearest even number) are stored by DOS in the disk directory.


Attributes Associated with File
Attributes

The file attributes are displayed as a series of characters which may include any of the letters RHSDA, for Read/only, Hidden, System, Directory, and Archive, respectively.  These attributes indicate that a file has certain properties which may affect how you and DOS can access and use it.  Following this listing of the attributes are directions showing how you can use CT to change most of the file attributes.


Read/Only Attribute
Read/only

A file with the read/only attribute cannot be modified, overwritten or deleted.  DOS simply won't allow the operation to happen, unless the read/only attribute is first removed.


Hidden Attribute
Hidden

Hidden means that a file won't show up in an ordinary DIR command from the DOS command processor, and the DOS COPY command won't copy a hidden file.


System Attribute
System

System means the file is a special type which is part of DOS itself.  Examples of this type of file include the two parts of DOS that you'll find in your root directory, named differently depending on which version of DOS you're using.


Directory Attribute
Directory

Directory makes the file a subdirectory, rather than a data file or a program.  In the DOS system, subdirectories are special files that contain information about the files that are stored under them.

This is an attribute that you can't change with CT-Shell - nor would you want to - because directories are a very special kind of file that is created and maintained by DOS.  An ordinary text or program file cannot easily be converted to a directory, or vice-versa.


Archive Attribute
Archive

The archive attribute means that a file has been changed since the last time it was backed-up.  Most backup programs, such as the DOS BACKUP command and commercial programs like CPBACKUP and WNBACKUP from Central Point Software, Inc., use this attribute to determine which files need to be processed when a differential backup is done.


Changing File Attributes
Changing Attributes

Besides displaying the attributes, CT makes it easy for you to change most of them.  You can't turn a program into a directory, but you might want to make a file read/only, to prevent its being accidentally deleted or overwritten.

You can alter the attributes for a single file or for a group of tagged files if your CTSHELL.INI file contains a menu entry that uses the keyword Attrib (see the later section on CT keywords for more information about Attrib and other CT keywords).  The sample CTSHELL.INI file contains entries for both the File and Tagged menus that implement this keyword.

•	Select one or more files in the current directory that have the Archive attribute.

•	From the Tagged menu click on Attributes.

•	Don't select any attributes from the dialog box that is presented.  Just click on [OK] to accept none.

When you invoke that menu entry, CT will present a dialog box that lets you determine which attributes are to be turned on and which ones are to be turned off.  The attributes that you select are not added to the existing ones, but replace the existing ones.  Thus, be sure you select all the ones that should apply.  You can turn off all the attributes by leaving them all unchecked, and selecting [OK].


Display of Disk Drives
Disk Drive Display

At the end of the files listing, you'll find entries for all the disk drives in your system.  Each is identified as to type, and each (except a floppy) has its current remaining capacity.

Ignore Drives

If you have a complex computer system - perhaps one with a lot of network drives in addition to the local ones - you may not want CT to monitor all the drives all the time.

For one thing, whenever you change directories, all those drives have to be queried, to find out how much space remains, so that can be displayed here.  There is an option available through your PREFER keyword that allows you to declare a series of drive letters that you want CT to ignore.  You can also modify the IgnoreDrives setting in the [OPTIONS] section of your CTSHELL.INI file, if you want.

Note that this does not keep you from accessing those drives.  They simply will not be listed in this display.  You can still change to a drive in any of the ways that CT-Shell supports.


Extended File Selections
Extended Selections

CT-Shell's file window is programmed to allow extended selections.  Thus, you'll find that you can tag multiple files by holding down the Shift or Ctrl keys as you tag with the mouse.

Shift will allow you to extend a selection to include contiguous files (a group all together) and Ctrl will let you select any files, even if they are separated by others that you don't want tagged.


Doubleclicking Entries in Files List
Doubleclicking Entries

Things happen when you doubleclick the mouse on an entry in the files list!  (You may also move the highlight bar to an entry and press Enter.    What happens when you do either of these things will depend on what kind of file is selected:

Directories

If it is a directory, then you will change to that directory.  This is another of CT-Shell's "permanent" directory changes, and it will continue to work in the new directory until you change again.  However, you are still able to return to your original startup directory by pressing F6 at any time.

Executable Files

If it is an executable file (to CT, that means EXE, COM, PIF, CTB or BAT) you will execute that file.  This provides a convenient way to run programs that are in the current directory, and which require no command-line arguments.  (Those that reside elsewhere, and those that do require command-line arguments should be installed as menu entries instead.  See the manual for more information about setting up your menu to run additional programs.)

Known Extensions

CT checks the [Extensions] profiles in your WIN.INI file, and can "run" files that are not themselves executable, but for which you have provided an extension association in your WIN.INI file.  Thus, it is likely that if you doubleclick the mouse on a WRI file, you'll start up Windows Write and can edit that file.  If you doubleclick on a CRD file, you'll start up the Cardfile database program, etc.

CT provides a convenient way for you to modify and add extensions to your WIN.INI file.  From the default Windows menu, select the Edit Extensions entry to invoke a dialog that you can use to discover whether an extension is known, and if so, what program it is associated with.  You can also change an existing association or add a new one for an extension not previously found there.

Drive Specifications

If it's one of the entries at the end of the files list that  describes a disk drive in your system, doubleclicking on it will change to that drive, which will then become the default, or current, drive.  As in many earlier examples, CT will continue to work in the new drive/directory until you change away from it, but you can instantly return to your original startup directory by pressing F6.


Status Line Window
Status Line

Not to be confused with the Status Window to the left, the status line just below the files listbox contains a changing stream of information depending on what operation you are currently involved in.  Whenever CT does something for you, such as copying a file or changing directories, you'll be notified in the status line.  You can often tell when a process has finished by looking here.  At the end of most operations, the status line will be cleared.


Using The CT-Shell Command Line
The CT-Shell Command Line

CT-Shell provides a command-line interface that will allow you to issue DOS commands, run DOS applications, run Windows applications, and issue CT-Shell commands.  You can also use it to run special CT-Shell batch files.

The CT command line maintains a history of the commands you've entered, so you can easily issue one of them again, without needing to enter the command again.  If the list of saved commands becomes large, or if it contains many commands that you won't be using again, you can clean it out by selectively deleting items from it.


Issuing DOS Commands
DOS Commands

Most common DOS commands like CD, RD, MD, COPY, and DEL are handled internally in CT, without using the DOS command processor at all.  Most of the DOS commands that CT handles offer enhancements over their DOS counterparts.  For example, the CD command will allow you to specify a drive as well as a directory to change to.  RD, MD and DELDIR all allow you to specify multiple arguments.  Thus, the command:

MD bin init include lib

will create four subdirectories in the current directory.  You won' t need to issue a separate MD command for each directory you want to create, as you would need to do at DOS.

The COPY command uses a buffer up to 16 times the size of the one DOS uses, allowing many files to be copied with only one disk read and one disk write.  In addition, CT-Shell can be instructed to share time with other Windows programs during operations like a file copy, so that other programs aren't brought to their knees while the copy is being made.

If you enter a DOS command that CT cannot handle itself, it will pass that command along to your DOS command processor for evaluation.  Fortunately, all the most-often-used DOS commands can be dealt with smoothly within CT, without involving the DOS command processor at all.

However, if a command involves the DOS redirection operators ( <, >, >>) or the pipe operator ( | ), the whole command is passed to DOS immediately, as is any command to run a BAT file or a COM file.  (Windows executables are all EXE files.)


Keeping the Command Line Open
Persistent Command Line

CT offers an option, available through the Preferences dialog, that allows you to keep the command line open following a command, so that you can continue to process DOS, Windows, or CT-Shell commands without reopening it.

If this option is selected, the command line will go away only when you select the [Cancel] button.  If this option is turned off, the command line will close after each time you use it, and you will need to reopen it for any subsequent commands.


Modes for Running Programs
Run Mode

If you are issuing a command to run a Windows application, you can select from the options in the upper right-hand corner that allow you to run that program as an icon, or full-screen, or normal size.  (Actually, the default is normal, if you don't select either of the others.)


Recalling (Repeating) Previous Commands
Command Recall

CT maintains an internal doubly-linked list of previous commands, and lets you scroll through them to select a command to issue again.  Each command that you type at the command line is added to the list, if it isn't already there, and there are three options for deleting old commands that you no longer want to scroll through.


Reference to CTSHELL.INI File
CTSHELL.INI Reference

The real power of CT-Shell is unleashed when you make a few simple modifications to your CTSHELL.INI file, to customize it for your system and for the way you work.  Nearly all of these modifications can be done from the Preferences dialog without leaving CT.  This section describes the various areas in that file that can be modified by the user.

Options are recorded there for future sessions, and all the special menu entries that you create are stored there.  As long as CTSHELL.INI is stored in the current directory, a directory along your DOS path, or in your Windows "home" directory, CT will be able to find it when it needs the file.  It is suggested that you keep CTSHELL.INI in your Windows home directory with your other important xxx.INI files.

Use the help engine's browse buttons to scroll through the series of sections that follows.


Accessing the CTSHELL.INI File
Accessing CTSHELL.INI

Your CTSHELL.INI file is an ordinary ASCII text file that can be edited with nearly any editor or word processor.  Although the Windows NOTEPAD isn't a powerful editor, it is fine for the light-duty work of customizing your initialization file.  Editing is necessary to change or add menu entries; most other options can be changed or added either by editing CTSHELL.INI or by making selections from Preferences and other dialogs.


Changing Options with Dialogs
Options Dialogs

There are several CT dialogs that also affect portions of your CTSHELL.INI file, especially those sections that affect the way options are implemented (as opposed to menu items and entries).  Any of these other option settings can always be changed by editing CTSHELL.INI, but usually the dialogs provide the easier way to make such choices.

For example, the way your printed listings are formatted is affected by a dialog that is invoked by the CONFIG keyword.  The alarm/event settings are affected by a dialog that is invoked by the ALARM keyword.  The PREFER keyword invokes a dialog that allows you to set a large number of preferences, all of which will be explained in the sections that follow.  All of these dialogs are invoked by entries in your Shells menu.

The following sections describe the various parts of your CTSHELL.INI file, and what changes you might want to make to each of them.


Alarm (Events) Section
[Alarm]

This section was new for version 2.0 of CT-Shell, and improved somewhat for version 2.10, and again for version 2.20.  If you've only used earlier versions, be sure to study this feature carefully.  This section of your file contains the controlling data for up to ten event timers that work like alarm clocks.

Although you can edit this part of the file manually, the easiest way to set up a timed event, or to have CT display a reminder of some kind at a predetermined time, is to use the ALARM keyword to invoke its dialog.  There is a graphic of that dialog, along with a more complete explanation, in Chapter 6 of the user manual, which is about CT keywords.


Autoexec Section
[Autoexec]

This section contains a series of entries (in the usual menu entry format), that determine the programs that will be started automatically when CT is first started.  Remember that you can use the ICON or LOAD keywords in addition to the name of a Windows executable, which causes that program to be loaded as an icon, instead of being run in its normal size.  Other keywords that can also be used here are RUN (or NORMAL), MAXIMIZE and HIDE.

This section is unaffected by any of the dialogs that change various settings.  The only way to place entries here is to enter them with an editor.  Many people find it easy to do a copy-and-paste operation, to copy entries from another section of the file, such as from the later menu section.


Color Settings
[Color]

There are three entries here, named as shown below, which each contain one component of the background color that's used for CT-Shell's main window.

These are the three primary additive colors, and the intensity of each color ranges from 0 to 255.  If all three were 0, the background would be black.  If all three were 255, the background would be white.  Various combinations of other values will create a whole spectrum of background colors, subject to built-in limitations of the video driver in use.


Editor Settings
[Editor]

The section marked [EDITOR] contains two settings that tell CT whether you have a text editor and whether it has a particular capability.  These settings are used in conjunction with the Find command, and will allow you to edit the file that contains a string of characters that you have asked CT to find for you.

On the assumption that anyone who has Windows has the NOTEPAD editor, that's the default, even if this section is missing from the CTSHELL.INI file.  Most programmers use more of a heavy-duty text editor however, and will want to change this entry to that editor name instead (including its path, if necessary).


Modem Settings
[Modem]

One of CT-Shell's functions is to store phone numbers in a dialing directory, and optionally to dial phone numbers for you, using a modem.  Nearly any kind of modem can be used for this, including the cheapest ones.  There are several entries in this section that can be changed, if necessary, to accommodate unusual or nonstandard modems, or phone systems that require additional characters to be dialed to access an outside line or to charge the calls to a credit card.


Options Section
[Options]

Here is a place to set a variety of options that affect the way CT works.  Almost all of these entries may be changed via the Preferences dialog, which is invoked by the PREFER keyword.  The default CTSHELL.INI file contains a number of entries in its [OPTIONS] section, and they are discussed in the following paragraphs.


Allow Dial Option
AllowDial

Some people may not have a modem connected to the computer on which they use CT-Shell, and others may simply not want to use CT to dial the phone for them.  This option lets you turn on or off the [Dial] button that appears in the Phones dialog.


Beep Option
Beep

CT is able to provide a beep sound at the end of lengthy operations, letting you know audibly that your task has been completed.  The default is on, as this may be your only clear indication that a process has finished.


Setting the Caption
CTCaption

At the top of the main CT-Shell window is a caption bar that contains information, such as whether the current instance of CT is your root Windows shell, an additional window, or an unregistered trial copy.  The string contained in CTCaption is added to the end of that caption line and separated from it with a hyphen, if it is present.  This provides a way for you to visually identify any of various instances of CT that you may have started using alternative xxx.INI files.


Setting an Encryption Key
EncryptKey

When you encrypt or decrypt a file, you must provide a key, which is a string of characters up to 64 long.  The greatest security comes from using a separate key for each file you encrypt, however that may be overkill for some situations.  It may also be hard for you to remember the key that you used, and without it you will be unable to reverse the encryption process.

You may want to provide somewhat less security, but much greater convenience, by establishing a particular key phrase to use for all files that you encrypt.  If this field is in your [OPTIONS] section, CT-Shell will use it automatically each time you encrypt a file.  If there is no entry for it, CT will ask you each time for an encryption key.

Unlike the other entries in this section, your encryption key cannot be modified using the Preferences dialog, for security reasons.  If you want to establish a default encryption key, you must edit your CTSHELL.INI file manually to do so.


Find Case Sensitive Option
FindCaseSensitive

When you ask CT to find a string within the text files in the current directory, you are able to specify whether that search will be case-sensitive.  If on (the default), you will need to enter a search target using uppercase and lowercase in the way it actually appears in the files.  If off, you can enter a search string using any case.  This option can be changed from Preferences.


Find Whole Word Option
FindWholeWord

Another Find option, this one lets you determine whether to report success for a find that matches part of a larger series of characters, or for a find that matches a whole word only.


Flexible Window Size Option
FlexSize

There is ordinarily no reason to resize CT-Shell's main window, since all the data that is presented there is fixed in size and in relation to the other components.  Ordinarily, if you were to enlarge the window, it would only allow you to see unusable areas, and if you accidentally decreased its size, you would cover up parts of CT that you really do need to see.

There are some video adapters and drivers available for Windows that are only partially compatible, however, and yours may not display all of the CT-Shell window properly.  If that's the case, you may be able to use CT more comfortably by resizing the window after opening it.

If this FlexSize option is enabled, CT will do two things differently.  First, the CT window will be made one line taller, which may be all it takes to solve a video driver problem.  Second, the window will become resizeable, so that if that extra line isn't enough, you can enlarge the window even more.


Ignore Drives Option
IgnoreDrives

The IgnoreDrives setting has already been discussed in an earlier section.  If you have a system in which there are a great number of drives available - such as in a network - and you do not need a continuing display of the available space on those drives, you may instruct CT to ignore certain drives.  The example shown here would cause CT to ignore drives from F: on up:

IgnoreDrives=FGHIJKLMNOPQRSTUVWXYZ


Keep Command Line Open Option
KeepOpen

KeepOpen refers to the command line, and whether it should be kept open following a command, so that additional commands may be entered without reopening the command line dialog.


Activate Log File Option
Log Active

CT-Shell is able to keep a log of most of your activities in a text file.  The best way to tell whether you want a log is to use one for a while, then take a look at it.  No harm can result from that, unless you have a particularly slow disk drive, since a log entry is made for nearly every operation.


Setting the Log File Path
LogFilePath

The default for the log file is simply CTSHELL.LOG, since there is no way for us at Computer Training to know what subdirectories you have on your disk, or where you would like a log file to be stored.  With that as the file name, CT will create a new log file in every directory where you work.


Low Resources Warning Option
LowResources

CT-Shell incorporates a safety feature that will warn you whenever your free system resources fall below a particular percentage.  It is important to be aware of this situation, as attempting to run a program without sufficient resources can have unpleasant consequences.


Setting Mail In and Mail Out Options
Mail_In and Mail_Out

These two entries will not be useful for everyone, but for those who regularly work with files that contain network mail or email of any kind, the CT feature that uses them can be quite helpful.  Because of the way this mail notification feature works - by reporting on the presence or absence of two specified files - users may find other applications for this feature that have nothing to do with network mail.


Previous Shell Setting
OldShell

This entry contains the executable file name of the shell you were using before you installed CT-Shell.  If for any reason you want to return to using the original program as your default Windows shell, CT's UNINSTALL keyword can be used to change the SHELL= entry in your SYSTEM.INI file back to this program.  Normally, you would not want to modify this entry, however you could actually change to a shell that you weren't originally using by putting its file name here, then invoking UNINSTALL.


Require Confirmation to Quit Option
RequireConf

RequireConf refers to closing CT by doubleclicking on the system menu box, or selecting one of the options that closes CT, restarts Windows, or reboots your computer from your File menu or the system menu.  Remember, the system menu is the bar-in-a-box that's located in the upper left corner of the window in which CT runs.  With this option set to 1, you will be asked to confirm such a command.


Share Time with Other Programs Option
ShareTime

Windows provides a non-preemptive multitasking system for Windows applications, which means that when a Windows application gets control of the computer, that application retains control until it gives it up.  Under some circumstances, that might mean that a program could tie up the computer at the expense of other programs that need some attention, such as a communications program that is trying to stay synchronized with a remote host.

If ShareTime is turned on, which is the default, CT-Shell will be a "good neighbor" to other Windows applications, and it will pause from time to time during lengthy operations (like file copies, disk searches, etc.) to let other programs get some attention.  If it is turned off, then operations like a file copy will be done from start to finish before releasing control to Windows or to another application.


Shrink On Run Option
ShrinkOnRun

Some users have asked whether CT-Shell could shrink itself into an icon automatically when another application is run, and this feature is in response to those requests.  If ShrinkOnRun is turned on from Preferences, CT will do just that.  The default is off.


Files Sort Method Option
SortMethod

The listing of files can be sorted according to three keys.  The number stored in your SortMethod option corresponds to one of these keys.  Possible values and the method they represent are:  (1) sort by name, (2) sort by extension,  (3) sort by date/time, and (4) by size.  The method you prefer can be set from the Preferences dialog.

Note that whenever (2), (3) or (4) is selected, files will be displayed in file name order within each group.  The default is to display entries in file name order, which is slightly faster than the other options, (they require sorting on two keys).


Starting Position Settings
StartX and StartY

If these two settings are left out entirely - i.e., they do no appear in the CTSHELL.INI file at all - or if they are both set to zero, CT will automatically start in a centered position on the screen.


Tab Size Option
TabSize

The ENTAB and DETAB commands and keywords can be used to insert tabs into a text file or remove them.  Inserting tabs will replace a string of characters with one or more tab characters, and removing them replaces any tab characters with the proper number of spaces.

How many spaces replace a tab is determined by this entry.  Programmers using structured languages commonly use a tab size of 4, and that's the default that you'll find here.  Assembler programmers commonly use a tab size of 8.  Sometimes a size of 5 is used in documentation, such as for paragraph indentations.  This value can be modified from your Preferences dialog.


User Options - Function Key Assignments
User1 through User12

The User1 through User12 tasks are all assigned by keywords, so that those operations may be performed from any function key you want to assign them to.

These settings can be modified through the Preferences dialog, however users may find it easier to use the copy-and-paste capabilities of their editors to copy entries from the later [ITEMS] section in the CTSHELL.INI file to this section.


Visual "Beep" Option
VisualBeep

Some users who do not hear well at the frequencies used by a PC speaker may prefer a visual indication that a task has finished, in place of the audible beep that CT normally provides.  If VisualBeep is turned on, the audible beep will be replaced by a flashing of the caption bar at the top of the main CT-Shell window.  This flash inverts the color of that bar for a full quarter-second, so it is easily distinguished from various other - hopefully briefer - flickers of the main window.


Close Windows on Exit Option
WinClose

If you're using CT-Shell as your root Windows shell, you will probably want to close Windows whenever you exit from CT.  However, there's nothing about Windows that requires you to do that.  If you want to, you can exit from CT in a way that leaves any existing applications running.  After all of those have been closed, then you will exit from Windows.


Phone Dialer Section
[Phones]

This section contains a single entry in the distribution configuration:

[PHONES]

Phone0=Computer Training           1-(206)820-6859

The entries here are made available to you in the dialog that is invoked with the Phone keyword.  There is a menu entry for that purpose in the default configuration, in the Shells menu.

A graphic of that dialog and more details pertaining to its use are in Chapter 6 of the manual.


Setting Printer Options
[Printer]

The [PRINTER] section controls certain options that affect the way CT prints a file (or a set of tagged files) when you press the F8 key.  Each option is described briefly here.


Line Size Option
LineSize

The LineSize entry will be a number from 40 to 200.  It is settable with a spinner control from the configuration dialog.  It specifies the width of text file lines, as you usually work with them.  When printing text files, CT will choose the largest font that is available for your printer that will display at least that many characters on a single line, in addition to allowing room for borders and optionally line numbers.


Margin Size Option
MarginSize

MarginSize can be set between 0 and 4", in one-hundredths of an inch (entries from 0 to 400).  Note that this represents an additional margin beyond any that is already provided by your printer.  Most printers provide a 1/4" margin by allowing only 8" of text to print on an 8 1/2" page, so the default setting of 25 will provide total margins of 1/2".


Body Font Option
BodyFont

CT-Shell allows you to select two fonts to be used for printing your listings:  a font for the body of the text, and another for headings.  It provides combo boxes that list all the fonts available on your system, allowing you to select the ones that you want to use.


Heading Font Option
HeadFont

Here's where you determine the font that will be used to print headers on your pages (if you turn that option on) and header pages (also an option).  The size of headers defaults to one that will provide 80 characters in the heading, and isn't user-selectable.

There's no reason to require fixed-width characters here, so the default is Arial, an attractive font that's supplied with Win 3.1.  Headers are always printed bold.


12/24-Hour Display Option
24Hour

This option lets you determine whether the times printed in file listings will be in 24-hour "military" time, or in the conventional AM and PM format.   With this option enabled, 9:30 in the evening displays as 21:30, and with this option disabled the same time prints as 9:30pm.  This option defaults to off.


Draft Mode Option
Draft

Draft tells Windows whether to try to find a font for high-quality output or one that will print more quickly, with lower quality.  If Draft=1, lower quality will be allowed.


Print Headings Option
Headings

Headings determines whether name/date/time headings will be printed at the top of your listings.   If you enable this option, each file's name and creation date and time will be printed at the top left of the page in a bold font, and the date and time the listing was printed will be at the top right of the page.  Thus it will be easy to compare two listings to see which is newer.  You can print a few additional lines of text on each page if you turn off this option.


Header Page Option
HeaderPage

HeaderPage controls the printing of an optional first page for each file that shows its name and the time and date it was printed.  This header page does not have headings or page numbers.  The default is on.


Number Pages Independently Option
Independent

The  Independent option refers to page-numbering for multiple-file printing jobs.  If you have a series of files tagged before you press F8, all of them will be printed, not just the current file.  If Independent is turned on, each file listing will begin with page 1.  If Independent is off, the whole series of files will be page-numbered consecutively, straight through.


Number Lines Option
LineNums

If the file being printed is a program listing, chances are you'll want the lines to be numbered.  This option will cause them to be numbered from 1 to 99999, and separated from the text with a > and a space.  Thus, such a listing might look in part like this:

51>        if( iLimit > iValue)

52>              foobar( iValue );


Print Pages Odd/Even Option
OddEven

Prints all the odd pages first, then prompts you to change paper and prints the even pages.  This makes it fairly easy to print two-sided listings if your printer is capable of handling single sheets of paper.  If this option is turned off, which is the default, listings are printed normally.


Print Page Numbers Option
PageNums

PageNums determines whether your listings will have page numbers at the bottom of each page.  Be sure to see the closely related Independent option, above.  You can print a few additional lines of text on each page if you turn off this option, as the default is on.


Print Ruler Option
Ruler

Sometimes it is important to be able to tell exactly where text appears in a file, particularly in program listings where several strings that are intended for screen output must line up correctly.  The Ruler option will print a ruler line just below the heading on the page, if Headings have also been enabled.  Note that Ruler defines a line in terms of characters, not inches.  The default is off.


Print Text Bold Option
TextBold

Determines whether the body of a printed listing will be bold.  The heading (if used) will always be bold.  Defaults to off.


CTSHELL.INI Items Section
[Items]

This part of your CTSHELL.INI file determines the contents for your main menu, and of the pop-up menus that its items invoke.  There is no arbitrary limit to the number of menu items, although most people prefer to keep the number small enough (and the item names short enough) to make the menu fit on one line.  Likewise, there is no arbitrary limit to the number of entries that each menu item may contain.


Defining Menu Items
Menu Items

Each menu item is distinguished by the special word Item that appears first on its line, then a set of braces containing the item name as it should appear in the main menu.  Since braces are used as delimiters, the menu entries can contain quotation marks, if you want, as well as spaces, parentheses, and most other punctuation.  Also, since menu entries are so enclosed, CT is able to ignore comments outside of the braces.

item  {ItemName}         This is a comment, which CT ignores


Assigning Name to Menu Item
ItemName

The menu item name may contain embedded spaces, and it may contain the special ampersand character (&), which determines a letter that will appear underlined in the menu itself.  So identifying a key letter in the name provides a way for that menu item to be selected with a combination of the Alt key and that underlined letter.

Item names may be any practical size.  Keeping them brief, however, helps to keep the main menu on a single line, and many people find a single-line main menu easier to use.  CT will automatically detect a multiline main menu and adjust its window size accordingly.


Defining Menu Pop-up Entries
Pop-up Entries

Each pop-up entry contains five fields, delimited by braces, of which only the first field is required.  If you haven't yet loaded your CTSHELL.INI file into your editor to take a look at it, you should do so now.  The following descriptions will be most meaningful if you're looking at the sample menu entries as you read about their various parts.   To load CTSHELL.INI into the NOTEPAD editor from the default menu, select the Edit menu and choose the entry that allows you to edit CTSHELL.INI.


Assigning Entry Name
EntryName

{EntryName} {DirPath} {ExePath} {Switches} {Keyword}

The entry name is displayed in the pop-up menu to allow the selection of this option.  Like the menu item name, the entry name may contain an ampersand character to determine the character that will be underlined in the menu, thus providing easy access to this item with a keyboard command.  The ampersand is optional, but if it is used, it provides a quicker way to invoke this entry.

The entry name may also be preceded by a dollar sign ($), which has a special meaning.  Such an entry name is used only as a label for a section in the menu.  (Since a label is not an executable entry, any fields - sets of braces - that follow the first field are ignored, up to the end of the line.)  Thus, a number of commands to invoke various built-in DOS services might be grouped together under such an entry as in this example from the default configuration:

{$DOS SERVICES (current file)}

{    &Attributes} {} {} {} {ATTRIB}

{    &Copy} {} {} {} {COPY}

{    &Delete} {} {} {} {DELETE}

{    &Detab} {} {} {} {DETAB}

{    D&irectory Size} {} {} {} {DIRSIZE}

Two other special characters may be used in the name field, either in label entries or ordinary executable entries.  They provide separation from other pop-up menu entries.  If an entry name begins with a hyphen ( - ), there will be a horizontal bar in the menu, separating that item from the ones that preceded.  If there is a plus sign ( + ) before the name, that entry will begin a new column in the pop-up menu, with a vertical bar separating it from the preceding entries.

Note that spaces are considered to be ordinary characters, and can be used to provide indentation for a list of entry names that come under a label, as they were in the example just above.  The location of the - and + symbols is important, as they are considered special characters only if they appear in the first or second columns.  If they are embedded into an entry name, they are considered ordinary characters.

In contrast, the $ must always be used as the first character in the entry name, but it can follow a - or a +, if those are used to provide separation.  And, of course, the & retains its special meaning wherever it might appear in the entry name.  Here are some practical examples of these rules and considerations:

{-$UTILITIES}

starts a new section in the current column, using UTILITIES as the label for a group of entries.

{+$COMPRESSION}

starts a new column, using COMPRESSION as the label for a group of entries that have to do with data compression.

{-    LHArc &Add} {} {lha.exe} {a $archive name$ !} {}

starts a new section in the current column, separating it from previous sections with a horizontal bar.  This entry will be indented by four spaces.  The 'A' character will be underlined (such as in Add), and recognized as the significant letter to access this menu item.

The default configuration contains a number of examples that may guide you in developing new entries for your own programs.


Defining Directory Path to Change To
DirPath

{EntryName} {DirPath} {ExePath} {Switches} {Keyword}

The directory path is an optional field which, when provided, causes CT to change either temporarily or permanently to that directory, before executing any program that may be part of this entry.

If a directory path field is present and an executable path field is not, it is assumed that the explicit purpose of this entry is to change directories permanently.  In that case, CT will change to the specified directory, and will continue operating from there.


Defining Executable File Path
 ExePath

{EntryName} {DirPath} {ExePath} {Switches} {Keyword}

The executable path is the path name for an executable file which is to be run when this entry is selected.  Because the menu entries are processed by a command processor that can look throughout the DOS path for an executable file, programs that reside along the DOS path may be listed here without any qualifying path information.

However, if the program to be executed does not reside along the DOS path, you must include the entire path/file name here.  More information about path names and the DOS path is available in your DOS manual.

An example of an executable that lies along your DOS path is CALC.EXE, assuming that it is in its customary place in your Windows directory.  Here's a menu entry that would run the Windows calculator utility:

{&Calculator} {} {calc.exe} {} {}


Defining Program Switches (Arguments)
Switches

{EntryName} {DirPath} {ExePath} {Switches} {Keyword}

Programs often require additional information on the command line when they are run.  An editor, for example, can often be told what file to edit by including the file name as part of the editor command.

The switches field is the one in which the CT special field characters are most often used (see the manual, Chapter 8).  Using object-oriented techniques, you are able to include the current file as part of your command, a list of all the tagged files, an environment variable, and more.  You are even able to cause CT to prompt you for one or more values to be inserted as it runs.


Defining a Keyword Field
Keyword

{EntryName} {DirPath} {ExePath} {Switches} {Keyword}

Many of the operations that CT performs are handled internally by CT itself.  That's how it is able to improve on many of the DOS commands, rather than passing the commands along to DOS.  A keyword is almost always used in place of - rather than in addition to - an executable program.  In fact, if there is a keyword in this last field other than those few that specify the run mode for a Windows executable, CT will process that keyword first, and ignore any entries that may be in the executable path or switches fields.

Because CT-Shell keywords provide so much of the functionality of the program, the whole next section is devoted to an explanation of them.


CT-Shell Keywords Reference
CT-Shell Keywords

CT-Shell keywords are listed here, along with a brief description of what they each accomplish.  These keywords invoke built-in operations that CT-Shell provides.  They are used in the last (fifth) set of braces in a menu entry.  Use the browse keys to move among the keyword descriptions, which are arranged alphabetically.


Keywords Affect Single and Tagged Files
Single and Tagged Files

When a keyword is designed to affect a single file, CT needs only to inquire which file is the current file in the file list, and apply that operation to that single file.  When a keyword is designed to affect a list of tagged files, CT needs to go through all the entries in the file list and ask of each, "Is this one tagged?"  Then it applies the operation to the ones that are, skipping the ones that are not.  Obviously, it is easier and quicker to affect only the single current file.

Keywords that are intended for use with tagged files will almost always work with the current file, which is almost always considered to be tagged.  Examples of most of these keywords are already included in menu items in the sample CTSHELL.INI file.


Information About CT-Shell
About

Displays information about CT, including the number of the version that you're using.


Scheduling Events (Alarms)
Alarm

Allows the user to modify the settings used by the ten event timers that CT provides.  If a time is established and that timer is enabled, a message entered for that timer will be displayed at the specified time, and any menu-type entry placed in the event field will be executed at the stated time.


Changing File Attributes
Attrib

Changes file attributes.  Use this keyword in a menu item to let you change the attributes of the current file.  There is another version listed below that changes the attributes for a group of tagged files.


Tagging Files by Name
ByName

Presents a dialog box so you can specify a wildcard file name to use for tagging files.


Invoking the CT-Shell Command Processor
Command

Invokes the command processor that is associated with your COMSPEC environment variable.  In most cases this will be COMMAND.COM, the command processor that is supplied with MS-DOS and PC-DOS.


Configuring the Listing Options
Config

Configures the file listing options.  These are the settings within CT that affect how file listings are printed.  (See also the Printer keyword for access to the printer driver itself, which provides control over your installed printer.)


Copying a File
Copy

Copies a file to another location.  You are prompted for a destination for the current file, and it will be copied to that destination.  Like the DOS COPY command, you may supply a file name or a directory as a destination.  Another version is available to copy tagged files.


Deleting (Killing) a Directory
Deldir

Deletes the currently-selected directory and all files in it.  Be careful!  This one is so powerful that there are two confirmations necessary to make it work (you're asked twice whether it's okay to delete the directory).

The entire subdirectory will be deleted, including any files in it and any subdirectories under it, even any files that have the read/only attribute.  This is a wonderful way to remove an outdated or unwanted directory during disk maintenance, but it requires you to be careful.


Delivering Files from Packing List
Deliver

This keyword is part of the CT-Shell Pickup/Deliver functionality, and is useful only after you've picked up one or more files using the PICKUP keyword.  It will copy any files from your current packing list to the current directory.  DELIVER does not remove those files from your packing list, so you are free to deliver them to any number of destinations.


Deleting a File
Delete

Deletes a file.  This removes a file in a way that often cannot be reversed.  Be careful, and be sure that you mean it when you use this keyword.  You are asked only once for confirmation.  Another version is available for deleting a series of tagged files.


Deleting the CT-Shell Log File
DelLog

The CT-Shell log file is a convenience that some appreciate, but there's little reason to let it grow too large.  Usually there's no need to refer to operations you've done more than a day or so ago, and the log file could potentially eat a lot of your disk space if it is allowed to grow forever.

When your log file becomes larger than 50 KB in size, CT will call your attention to this fact the next time it enables logging.  That occurs each time you start CT, or when you turn logging back on after having shut it off.  You are given the option to delete the log file on the spot, or to leave it alone and continue.


Removing Tabs from a File
DeTab

Removes tab characters from a text file, and replaces them with spaces, according to the TabSize entry in the [OPTIONS] section of CTSHELL.INI.  This keyword affects the current file.  A similar keyword is available to remove the tabs from a series of tagged files.


Measuring the Size of a Directory
DirSize

Displays a listing that shows you how big a directory is.  It shows how many subdirectories it contains, how many files, and how many bytes they all add up to.


Editing the CT-Shell INI File
EditIni

If you have provided a default editor name (in your Preferences dialog), CT will be able to edit your current CTSHELL.INI file wherever it may be, without your needing to change to that directory and execute your editor explicitly.  Note that CT assumes a default editor name of NOTEPAD.EXE if you have not changed it, so this feature should work for everyone, right from the start.  If you do change the default editor name, CT will thereafter use your editor instead of NOTEPAD.


Editing or Viewing the CT-Shell Log File
EditLog

Use this keyword to invoke your default editor to view or change your current log file.  As in the case of the initialization file, each instance of CT is aware of the name of its own log file, so you needn't worry about editing the wrong one.


Encrypting a File
Encrypt

Modifies a file so that it is no longer useful for anything.  Used a second time on an already-encrypted file, the same process returns it to its original condition.  Thus, this keyword can provide security for data files, documents, letters, spreadsheets, and databases that you may leave on your computer.  It can also be used to encrypt executable files, so they cannot be run.  In fact, any file can be encrypted using the method implemented by CT-Shell.

Another version is available for encrypting a series of tagged files.


Inserting Tabs into a File
EnTab

Replaces series of spaces in a text file with tab characters, according to the TabSize entry in the [OPTIONS] section of the CTSHELL.INI file.  This keyword affects the current file.  A similar keyword is available to insert tabs into a series of tagged files.


Examining a Command
Examine

There may be times when you need to diagnose a menu entry that isn't working quite right.  Perhaps you found yourself executing a different program than you thought you would, or editing a different file than you intended.  The EXAMINE keyword gives you a chance to see just what contents are in your entry fields at the time CT-Shell is just ready to execute your instructions.


Exiting from CT-Shell
Exit

Shuts down CT-Shell.  You can also do this by double-clicking on the system menu box in the upper left corner of CT-Shell's window, but some people find it easier to pick an exit command out of a menu instead.


File Name Extensions
Extensions

File name extensions often provide a convenient way to identify the applications that work with that particular type of file.  For example, CRD files are usually used with the Windows CARDFILE utility.  By default, TXT files are associated with the NOTEPAD editor.  You may use other applications, such as dBASE, which creates and uses DBF files, or Excel, which creates and uses XLS files.

CT-Shell makes it easy to start a program by doubleclicking on an executable filename in the files listbox, and it extends this capability to non-program file types that have an executable program associated with them.  Your Windows WIN.INI file has a section called [Extensions] that lists the file name extensions you want associated with particular executable programs, and CT-Shell provides an easy way for you to view and modify those associations without leaving CT.


Writing Clipboard Contents to a File
FileClip

This keyword creates a file of the current clipboard, if there is any text data there.  You are asked for the file name to use, and you may provide a simple filename or a complete path/file name.  If you use a simple filename, the file will be created in the current directory.


Copying Files List Information to the Clipboard
FileInfo

Copies the descriptive information (from the files listbox) to the clipboard, from where it can easily be pasted into a document with nearly any editor, or used in other programs for which it is appropriate.  This keyword is implemented in the Clipboard menu.


Finding a String Among Files
Find

The FIND keyword is an implementation of the same logic that is used in the Find command, which can be used at the CT-Shell command line.  With it you can find all the occurrences of a string of characters within the files in the current directory, edit one of the entries, print a list of the matching files, or copy a list of  matching files to the clipboard.


Printing a Fonts Listing
Fonts

Prints a listing of all the fonts on your system, making it easy to select the ones you want to use for tasks like word-processing.  This one is available in the Edit menu of the default configuration, from an entry called Fonts Listing.


Running a Program Full-Screen
FullScreen

One of the RunMode keywords that specifies how a program is to be run.  This is used in the last field of a menu entry, the Keyword field, and affects only programs that can be run in this mode.


Sending a Formfeed to the Printer
FormFeed

When you have copied something to the printer, and it has not advanced the last sheet, you can force a formfeed with this keyword.  It is invoked by a menu entry in the Edit menu of the default configuration.


Getting Help
Help

Runs the Windows help engine.  This provides access to the online helpfile that explains what all these options do, and reminds users how to use CT-Shell.  You can start at the index, and select the topic you want to review.  Wherever feasible, the help file contains hyperlinks to other topics, making it easy for you to find all the information related to a subject.


Running a File Hidden
Hide

One of the RunMode keywords that specifies how a program is to be run.  This is used in the last field of a menu entry, the Keyword field, and affects only programs that can be run in this mode.  In particular, DOS applications must have a PIF file that runs them in a window, or this will have no effect.


Changing the "Home" Directory
Home

Changes the CT "home" directory to the current directory, so that when you press ^ this is where you'll return to, rather than the directory in which CT was started.


Running a Program as an Icon
Icon

One of the RunMode keywords that specifies how a program is to be run.  This is used in the last field of a menu entry, the Keyword field, and affects only programs that can be run in this mode.


Inverting the Tagged Condition of Files
Invert

Inverts the condition of all the tagged files.  Those that were selected become unselected, and vice versa.


Determining Whether Text in the Clipboard
IsClip

Is there text in the clipboard?  If you want to be sure before printing the clipboard, or before starting another application to use that data, you can test with this keyword.


Counting Number of Lines in a File
LineCount

This one counts the number of non-blank lines in a text file, and is usually used to measure how large a program source file is, in terms of the number of lines of code.  It displays the number of lines that contain anything in addition to a carriage-return.  Another version counts the lines in a series of tagged files.


Loading a Program as an Icon
Load

One of the RunMode keywords that specifies how a program is to be run.  This is used in the last field of a menu entry, the Keyword field, and affects only programs that can be run in this mode.


Loading a New INI File
LoadIni

The current file is loaded as a new INI file, reconfiguring CT-Shell accordingly.  Having loaded another INI file this way, you can return to the previous configuration with the PREVINI keyword.  These are both implemented in the Shells menu in the default configuration.


Losing the Files in the Packing List
Lose

When you have used PICKUP to collect some files to be delivered elsewhere, they will remain onboard until you either SURRENDER them to a directory or LOSE them.  This keyword removes all the files from your packing list, so that you will no longer carry them around with you.


Discovering Whether Mail is Waiting
Mail

Displays a message box that tells whether there is mail waiting to be read, or waiting to be sent to a destination.  This feature actually just comments on the existence of the two files identified by path names in the Mail_In and Mail_Out entries in the [OPTIONS] section of your CTSHELL.INI file.  If the user does not participate in network mail or email, this feature could be used to determine the existence of any other two files, possibly serving some other useful purpose instead.


Running a Program in Maximized Mode
Maximize

One of the RunMode keywords that specifies how a program is to be run.  This is used in the last field of a menu entry, the Keyword field, and affects only programs that can be run in this mode.


Moving a File to Another Directory
Move

Moves a file to another location.  If the destination is on the same drive as the source file, this feature changes the directory information relative to a file without copying the file itself.  Thus, a move from one directory to another on the same drive takes only part of a second, no matter how big the file that is being moved.  No file data needs to be read or written, just the directory entry for that file.


Moving Files from Packing List to Current Directory
MoveHere

You may want to PICKUP files from one or more locations, then MOVE them to the current directory, rather than copying them to here with DELIVER or SURRENDER.  This keyword provides that service.  It also removes those files from your packing list (since the original path/file names are no longer valid), so there is no need to LOSE them after MOVEHERE.


Running a Program in Normal Mode
Normal

One of the RunMode keywords that specifies how a program is to be run.  This is used in the last field of a menu entry, the Keyword field, and is the default if no other run mode is specified.


Returning to the Original Path
OrigPath

Returns to your original path, or one that you have explicitly changed your original path to be.  This is invoked by F6 in the default setup, and provides a way easily and quickly to return to the drive/directory from where you started CT-Shell.


Displaying Packing List of Files
Packing

Displays a packing list, showing you all the files that you've picked up with the PICKUP keyword, and haven't yet gotten rid of with the SURRENDER, LOSE or MOVEHERE operations.  You'll know that you're carrying files around with you by the appearance of the caption at the top of your CT-Shell window.  To find out exactly what files they are, invoke this keyword.


Creating and Using the Phone Directory
Phone

The built-in phone directory can be used to recall numbers for manual dialing, and on a computer that is equipped with a modem, it can be used to automatically dial a listed number.  Although a large number of phone numbers are more easily added to the CTSHELL.INI file with an editor, the dialog that is invoked by the PHONE keyword can also be used to add and delete entries.  As well, it is used to look up numbers and optionally to dial them.


Pick Up Files
PickUp

Picks up a list of files that have been tagged, and inserts them into CT-Shell's Packing List.  They can then be moved or copied with the file maintenance entries in the Pickup/Del menu, and with the function keys that have been assigned for that purpose.


Changing CT-Shell Position on Screen
Position

CT-Shell defaults to displaying itself centered on the screen.  Its main window is small enough to fit well using the resolution of any monitor that can be used with Windows.


Setting Preferences (Options)
Prefer

This one invokes the Preferences dialog that makes it easy for you to change many of the settings that are stored in your CTSHELL.INI file, without needing to load and edit that file with an ordinary editor.


Switching to a Previous INI File
PrevIni

Used with the LOADINI keyword, this one returns to the previous configuration.  If a new INI has not yet been loaded, this keyword has no effect.  However, after a new INI has been loaded, you can use PREVINI to toggle back and forth between the two configurations.


Printing Files (Formatted)
Print

This begins the process of printing one or more selected files.  Printed copies of text files are usually called listings when they do not refer to documents, such as letters.


Printing the Clipboard Contents
PrintClip

If there is text currently in the clipboard (see the ISCLIP keyword), you can print a copy of it with this option.  Line size and font selection are determined by your current printing options, which you can change by invoking the CONFIG keyword.


Printer Setup
Printer

Invokes your printer driver setup function.  The exact set of features and options that are offered by this function depends on the printer driver that you use.  This is probably where you can change from portrait to landscape mode, determine how high your graphic resolution should be, download font software, etc.


Printing the List of Files
PrintList

Prints a copy of the selected files in the CT-Shell files listbox.  Note that this is handled differently than the Where and Find listboxes, where all the entries are included when you ask to print them.  By printing a list that includes only the selected files, you are able to use this function to create reminders of temporary files that you want to delete at a later time.


Printing a File (Unformatted)
PrintUnf

Prints the current file unformatted, that is, without heading, margins, line numbers, or page numbers, and in the default font for the active printer.  This produces a very fast listing for "throw away" files that you want to see quickly, but do not need to be formatted in any way.  In that respect, it's the equivalent of the DOS PRINT command, but more convenient, since you can pick the file(s) to be printed from your files listbox.

Another version is available to print a list of tagged files.


Rebooting the Computer
Reboot

There may be times when you have made changes to a system configuration file (such as CONFIG.SYS or AUTOEXEC.BAT), and you need to reboot your system for those changes to take effect.  The REBOOT keyword does that from within CT-Shell, and is different than doing an ordinary DOS warm boot in an important way.  By invoking this keyword, you give Windows applications a chance to shut down in an orderly way before the rug is pulled out from under them, so to speak.


Reloading a Changed INI File
Reload

If you have edited your CTSHELL.INI file manually, rather than changing its contents with the various dialogs that CT-Shell provides, you will need to let CT know that you want it to re-read the setup information and reconfigure itself.  RELOAD does just that.  In the default configuration, this is assigned to the F7 key.


Removing an Empty Directory
Remove

Removes the current directory, essentially duplicating the operation of the DOS command RD (or its synonym, RmDir).  Like the DOS command, REMOVE requires that a directory be empty before it can be removed.


Renaming a File
Rename

Changes the name of a file, and unlike the DOS REN command, CT will change the name of a directory as well.  This is actually implemented as the same low-level DOS function that MOVEs a file, and it can be used for the same purpose.  If you provide a new pathname that includes a different directory than the current directory, your file will be not only renamed, but moved to that directory as well.


Starting the Resource Monitor
Resource

Windows has available two separate data areas in your computer's memory, called heaps, that store information that is needed as you use Windows.  One of them is called the GDI heap (Graphics Device Interface), and the other is the USER heap.  These are used and managed by two of the three main components of Windows.

The RESOURCE keyword in CT-Shell can be used to invoke a small monitor that will remain available as you load and run other programs.  This feature is implemented in the default configuration as the Monitor Resources entry in the Shells menu.  Just click that entry to start the monitor.


Restarting Windows
Restart

After making major changes to any of the Windows configuration files (such as WIN.INI, SYSTEM.INI, etc.), you may want to close CT-Shell and restart Windows, so those changes can take effect.  This keyword will restart Windows, after giving your applications a chance to shut down normally.  (See the discussion of REBOOT, earlier in this section.)


Running a Program in Normal Mode
Run

One of the RunMode keywords that specifies how a program is to be run.  This is used in the last field of a menu entry, the Keyword field, and affects only programs that can be run in this mode. Run is the default, a synonym for Normal.


Setting File Date/Time
SetDate

Displays a dialog box that allows you to change the date/time for one or more selected files.  This same keyword works for both single and tagged files.


Shredding a File
Shred

Destroys a file so that it can't be read even if it is somehow undeleted.  This is analogous to feeding a document into a paper shredder, for security reasons.  The confirmation dialog looks almost exactly like the one for the DELETE keyword.


Setting the System Time/Date
SysDate

This one lets you reset the system date and time, that is, the computer's main clock.  It works like the DOS commands DATE and TIME, but it does it from within CT-Shell.


Surrendering a Packing List of Files to Current Directory
Surrender

Having picked up one or more files from one or more directories using the PICKUP keyword, the commonest subsequent operation is to copy them somewhere else, and empty them from the packing list of files.  The SURRENDER keyword handles both these tasks-the copying and the emptying.  It is a combination of the routines DELIVER and LOSE, which are both available to be used separately.


Displaying System Information
System

Displays system information.  This is similar to the information you can get from the Windows Program Manager by clicking on its Help/About option.  You can find out what mode you are running, using what kind of processor and coprocessor (if any), and whether small-frame or large-frame EMS operation is in effect (if any).  This keyword does not display the amount of memory available, as CT displays that at all times anyway.


Tagging All the Files
TagAll

Tags (selects) all the files in the current directory.  By default, this is assigned to the F2 key.


Making File Time/Date Current
Touch

Makes the date/time of the current file reflect the current date/time.  This is mainly of interest to programmers, who sometimes need to adjust a date in this way while using a MAKE type program maintenance utility.


Untagging All the Files
Untag

Untags all the files in the current directory.  The default configuration assigns this operation to the F3 key.


Un-Installing CT-Shell
UnInstall

It is highly unlikely that anyone who tries CT-Shell will want to go back to using their previous shell, but this keyword can be used to replace the original SHELL= entry in SYSTEM.INI.  If you were previously using Program Manager, for example, using this keyword will replace that as your default shell.


Locating Files on the Disk Drive
Where

The WHERE keyword is an implementation of the same logic as in the Where command, which can be used at the CT-Shell command line.  With it, you can locate a file anywhere on the current disk drive, go to that location, print a list of all the matching files, or copy a list of matching files to the clipboard.


Displaying Number and Size of Tagged Files
Tagged

Displays the number and size of tagged files.  If you have tagged a set of files to be copied to a floppy disk, you might want to check to be sure that the number of bytes tagged does not exceed the number of bytes that are free on your disk.


Changing Attributes of Tagged Files
Tattrib

Changes the attributes of tagged files.  If you should want to change all the EXE and COM files in a directory to read/only status, to prevent unnecessary share violations with a network, you could tag those files, then use this keyword to give them all a read/only attribute.


Copying Multiple Files to Other Location(s)
Tcopy

Copies a set of files to another location.  You must provide a directory as the destination.  CT does not support file concatenation (combining several files into one) by copying multiple files to a single file.  However, CT does support multiple destinations for a multiple file copy.

Put another way, you can tag an assortment of files that you want to copy to two places, then when the dialog asks for the destination(s), you can provide both.  When the first series of copies has been made, the second will be done automatically.


Deleting a List of Tagged Files
Tdelete

Deletes a set of tagged files.  You are prompted for confirmation before the deletion is accomplished.


Removing Tabs from Tagged Files
Tdetab

Replaces series of spaces with tabs, in a series of tagged text files.  For more details, see the description earlier in this section for the DETAB keyword.


Inserting Tabs into Tagged Files
Tentab

Inserts tabs to replace spaces in a series of tagged text files.  For more details, see the description earlier in this section for the ENTAB keyword.


Encrypting a List of Tagged Files
Tencrypt

Encrypts or decrypts a series of tagged files.  See the lengthy discussion of encryption earlier in this section, for the keyword ENCRYPT.


Counting the Lines in Tagged Files
TlineCount

Of the two keywords that will count the number of lines in files, this is usually the more often used.  You can tag all the files in a directory that are part of a programming project, and find out how many lines of code are included in them all.


Moving a List of Tagged Files
Tmove

Moves a set of tagged files to another location.  Just as with the single file MOVE keyword, if the move is from one place to another on the same disk drive, these files are not physically copied to their new location, just their directory entries are changed.


Printing a List of Tagged Files (Unformatted)
TprintUnf

Prints a quick, unformatted listing of a set of tagged files.  See the discussion of the PRINTUNF keyword for more details.


Shredding a List of Tagged Files
Tshred

Shreds a set of tagged files, so that their data is unrecoverable even if the files themselves are later undeleted.  The dialog presented for this keyword is nearly the same as the one presented for TDELETE.


Making Time/Date Current for Tagged Files
Ttouch

Changes the date/timestamp of all the tagged files to the current date/time.  Used mainly by programmers who use a MAKE type program maintenance utility.


Overview of CT-Shell Batch Files (CTB)
Batch File Overview

Its own internal batch file capability is a new feature, added for the first time to CT-Shell version 2.21.  Essentially, CT-Shell batch files (which have the extension CTB), can contain any commands that might be used at the CT command line.  That includes the names of DOS and Windows applications, DOS batch files, other CTB files, CT-Shell internal commands, and DOS internal commands.

If there is a CTB file in your current directory, and you doubleclick on it, or move the cursor bar to it and press Enter, it will be executed like any other executable file.  The list of commands that it contains will be carried out, one after the other, just as happens with a DOS batch file.  The main differences, of course, are that all the CT-Shell internal commands can be included in CTB files, also that Windows programs can be executed by them.

Alternatively, you can execute a CTB file from the CT-Shell command line, and the extension is optional, as it is with other executable files.  Of course, CTB files can also be used as commands within other CTB files.

CTB files are ordinary text files.  You can create one with a text editor like NOTEPAD, or with a word processor that allows you to save files as ASCII text.  Each line contains a single command.


Synchronizing Execution of External Programs
Synchronicity

There is one issue that needs to be considered before you begin writing and using CTB batch files - the issue of synchronous vs. asynchronous operation of multiple processes.  Although it involves technical terminology, the underlying concept is actually quite simple.

If one external process (such as running a program) must be completed before the next one is begun, you must precede the command that runs the program with the Exec command.  That will force CT to wait until it is finished before going on to the next command in the batch file.  A more complete explanation of this requirement and some examples are in the user manual.


CT-Shell Internal Commands

Each of these internal commands is also usable in CT batch files.  You can use the browse buttons to scroll through this list of commands, which is in alphabetical order.


Invoking About Box from Command Line or CT Batch File
About

Brings up the About Box, which tells about CT-Shell.


Setting Alarms (Events) from Command Line or CT Batch File
Alarm

Invokes the dialog box that lets you set alarms/events.  CT provides a way for up to ten events to be automatically executed every day.


Changing Directories from Command Line or CT Batch File
CD

Change directory.  Unlike the DOS command of the same name, the CT-Shell CD command allows you to specify a drive letter along with the directory name.  Thus, you can change from where you are on drive C to a directory on drive D with just one command, rather than two.  Example:

CD  D:\WINWORD\PERSONAL


Configuring Listings Options from Command Line or CT Batch File
Config

Configure listings (the way CT prints files).  Change your line size, fonts, and other options that affect the way files are printed when you press F8.


Copying Files from Command Line or CT Batch File
Copy

Like the DOS COPY command in most respects.  However CT's copy command allows you to provide a number of source files, and the last file in the list is assumed to be the destination.

If you want to copy a file or files from somewhere else to the current directory, you must use a dot (.) to represent the destination.  That's consistent with the way DOS works, but since DOS doesn't allow multiple source files, the destination can be assumed, if it is left out.  Since CT does allow multiple source files, the destination must always be specified.


Changing System Date from Command Line or CT Batch File
Date

Lets you change the system date and time.  Works just like the keyword of the same name, and invokes the same dialog box.  A synonym for this is Time, since both the system date and time are set from the same dialog.


Deleting Files from Command Line or CT Batch File
Del

Deletes one or more files.  The syntax for this command is just like that of the DOS DEL command, but the CT version can accept multiple file names, including multiple wildcard specs.  Thus, you could issue a command like this:

DEL  *.c  *.h

to delete all the C source files and all the header files from the current directory.


Delete Directory
DelDir

Deletes the directory or directories that are passed as command-line arguments.  This command deletes a directory, including all the files and subdirectories that it contains, even if they are marked as read/only.  It is very powerful for file maintenance, but requires considerable caution.  For that reason, you are prompted twice before the operation is carried out.


Deleting CT-Shell Log File from Command Line or CT Batch File
DelLog

The CT-Shell log file can grow quite large if you've had logging turned on for a while.  If it's over 50K in size, CT will remind you of that when you start it, or when you turn on logging.

If you no longer need the old log file, you can delete it with this keyword.  No command-line arguments are needed - each instance of CT is aware of the path to its own log file, and it will find it and delete it.


Removing Tabs in Files from Command Line or CT Batch File
DeTab

Removes the tab characters from a text file.  Works just like the DETAB keyword.  For more details, refer to the description of that keyword.


Measuring Size of Directory from Command Line or CT Batch File
DirSize

Measures a directory, which is supplied as a command-line argument.  Tells you how many bytes are occupied by all the files and subdirectories within the named directory.


Encrypting Files from Command Line or CT Batch File
Encrypt

Converts one or more files, which are supplied as command-line arguments, to a form that cannot be used for their original purpose.  Using this command a second time reverses the process, returning those files to their original condition.


Inserting Tabs in Files from Command Line or CT Batch File
EnTab

Replaces series of repeated spaces in text files with the proper number of tab characters.  This can make files a bit smaller, but entabbing is most often used by people who prefer the way tabs work with their text editors.

Since many people prefer ordinary spaces to tabs in text files, CT also has the DeTab command and keyword, described earlier.


Making CT Wait Until a Program has Finished
Exec

This command is used in CT-Shell batch files to insure that one external process has been completed before another is begun, when the order of execution is important.  Without this command, it would be possible for CT to begin a second process immediately after starting the first one, and that sometimes doesn't work well.


Exiting CT from Command Line or CT Batch File
Exit

Exits from CT-Shell, and possibly from Windows as well, depending on the options you've selected in the Preferences dialog.


Exporting a List of Files to Another Instance of CT
Export

Once a set of files has been placed into the Packing List with any of the commands from the Pickup/Deliver menu, that list of files can be exported to another instance of CT that is running.


Editing File Extensions in WIN.INI from Command Line or CT Batch File
Extensions

Windows is able to execute a program based on the extension of another file.  CT-Shell uses this feature to enable you to start your editor by "executing" a text file, or start your spreadsheet program by "executing" a worksheet.


Finding a String within Files from Command Line or CT Batch File
Find

Begins a process to find strings of characters among all the text files in the current directory.


Sending Formfeed to Printer from Command Line or CT Batch File
FormFeed

Sends a form-feed to the default printer.  This command is particularly useful after you've copied a file to the printer, as it will almost certainly have ended part-way through the last page.  Follow any such command in a batch file with the FormFeed command to eject that last page from the printer.


Invoking Help from Command Line or CT Batch File
Help

Invokes the Windows help engine, and searches for help based on the topic name that's provided as a command-line parameter.


Make Current Directory "Home" from Command Line or CT Batch File
Home

Makes the current directory the CT-Shell "home" directory.  Thus, it is the location that CT will return to when the OrigPath command is given, or when F6 is pressed.  The "home" directory defaults to the one where CT-Shell was started.


Import List of Files from Command Line or CT Batch File
Import

A companion to the Export command.  See its description for more details regarding exporting a list of files from one instance of CT and importing them into another instance of it.


Test Clipboard Contents from Command Line or CT Batch File
IsClip

Tells whether there's any text currently in the clipboard.  This command can be used before one that prints the clipboard, or copies its contents to a file.


Count Lines in Files from Command Line or CT Batch File
LineCount

Measures text files to determine how many non-null lines there are in them.  Provide one or more file names as command-line arguments.  When CT has examined the files, it will display the results in a message box.


Load a New INI File from Command Line or CT Batch File
LoadIni

CT lets you load more than one configuration at a time.  If you regularly use the computer for two distinct kinds of work, such as word processing and programming, you may want to create unique INI files for those two pursuits.

The LoadIni command is followed by the file name of the new INI file, if it's in the current directory, or its full path name otherwise.  CT will read the new INI file and change the menu system accordingly.

Once you've loaded a second INI file, you can easily and quickly return to the original configuration with the PrevIni command.  In fact, having done that, you can toggle back and forth between the two configurations using the PrevIni command.


Determining Whether Mail Waiting from Command Line or CT Batch File
Mail

Checks two file names (provided in Preferences as Mail_In and Mail_Out), and displays a message box that shows whether the files exist.  The assumption is that an incoming email or message file will exist only if there is new mail waiting, and an outgoing email or message file will exist only if there is mail that hasn't yet been sent.

Users who don't participate in email or network mail may find other uses for this command.  You can provide any two paths, and use it to determine whether the corresponding files exist.


Making a New Directory from Command Line or CT Batch File
MD

Makes one or more directories.  Essentially follows the syntax of the DOS MD command, but accepts multiple command-line arguments.  For example, to create several subdirectories at one time, you could do it with a single command like this:

MD sources bin include resource objects


Moving One or More Files from Command Line or CT Batch File
Move

Moves one or more files to a destination.


Returning to Original Path from Command Line or CT Batch File
OrigPath

Returns to the CT-Shell "home" directory.  That defaults to the directory where the CT session was started, but can be changed with the Home command or keyword.  It's convenient to be able to leave your workplace temporarily to do some type of file maintenance, for example, then return with this command.


Setting and Using Phone Directory from Command Line or CT Batch File
Phone

Invokes the Phone Directory dialog, which lets you edit phone entries, dial them, etc.


Invoking Preferences Dialog from Command Line or CT Batch File
Prefer

Invokes the Preferences dialog that lets you change most of the options that CT provides.  See the discussion of the PREFER keyword in the previous chapter for more details.


Loading Previous INI File from Command Line or CT Batch File
PrevIni

Returns you to the previous configuration, if you've used the LoadIni command or keyword to load a new INI file.  If you have not done that, this command has no effect.  After loading a second INI file, you can toggle back and forth between the two configurations with the PrevIni command.


Printing Files (Formatted) from Command Line or CT Batch File
Print

Invokes the CT-Shell file printing routine.  Provide the names of one or more files to be printed as command-line arguments.  Files are printed according to a number of options that are all settable from the Listings Cfg dialog box, available from the default Shells menu.  See Chapter 5 of the user manual for a thorough explanation of those options.


Printing the Clipboard Contents from Command Line or CT Batch File
PrintClip

Prints the contents of the clipboard, provided it contains any text.  Use the IsClip command to determine whether it does.


Printer Setup from Command Line or CT Batch File
Printer

Invokes the setup routine from the printer driver that's active.  This is where you can change features that are specific to your printer, and the options will vary accordingly.  On most printers, you can select landscape or portrait mode, change graphics resolution, and more.


Removing Directories from Command Line or CT Batch File
RD

Remove Directory.  Works just like the DOS command of the same name, but with the CT version you can provide multiple directory names as command-line arguments.

As with the DOS version, the directories must already be empty before they can be removed.  If you want to delete a directory together with all the files (and other directories) that it contains, use the DelDir command instead.


Rebooting Computer from Command Line or CT Batch File
Reboot

If you're in the ROOT shell, this command will exit from CT-Shell and reboot your computer, all at once.  If you are not in a copy of CT that is running as your root shell, an error message results.


Starting the Resource Monitor from Command Line or CT Batch File
Resource

Invokes the CT-Shell resource monitor.  A small window opens that displays the remaining percentage of free resources in the GDI and USER modules of Windows.  The lower of these two values is what Windows reports as "free system resources," and running out of either one can have serious consequences.


Restarting Windows from Command Line or CT Batch File
Restart

If you're in the ROOT shell, this command will exit from CT-Shell and restart Windows, all at once.  If you are not in a copy of CT that is running as your root shell, an error message results.


Shredding Files from Command Line or CT Batch File
Shred

Used like the Del command, this one first overwrites one or more files with a pattern of 1s and 0s, then deletes them.  That way the files are rendered useless even if someone later undeletes them with a utility program or a DOS command.


Displaying System Information from Command Line or CT Batch File
System

Displays system information.


Setting System Time from Command Line or CT Batch File
Time

A synonym for the Date command, this invokes the dialog box that lets you change the system date and time.


Making Files Time/Date Current from Command Line or CT Batch File
Touch

Accepts one or more file names as command-line arguments, and changes their date/time stamps to "now."  Used by programmers to cause the MAKE utility program to rebuild a project, by convincing it that certain files that are part of the project have been updated.


Un-Installing CT-Shell from Command Line or CT Batch File
UnInstall

Changes the SYSTEM.INI file, replacing CT-Shell as the default Windows shell with whatever was used for that purpose before CT was installed.  Then it restarts Windows, using that old shell.


Updating Display of Files from Command Line or CT Batch File
Update

Updates the listing of files in the current directory.  This command may be useful from a batch file, if external programs have been run that may have affected the files in the current directory in a way that CT-Shell is not aware of.  The current directory is read into CT-Shell, and its contents displayed in the files listbox.


Searching for Files on Current Drive from Command Line or CT Batch File
Where

Invokes a process that lets you search for files anywhere on the current disk drive.  For more details, see the complete explanation of this command in Chapter 4, in the discussion of the CT command line.


Reference to Special Field Characters
Special Field Characters

Many times a command should contain the name of the current file, a list of all the tagged files, or other additional information.  CT provides a powerful and easy way to generate complete commands, that doesn't require any programming knowledge or experience.  Use the browse buttons to scroll through this section.


Object-Oriented Substitution Explained
Object-Oriented Substitution

The term "object-oriented" here means that you do not need to write special code using a programming language, or call a function or procedure to do these things.  Certain objects (characters like ! and #) that you place in the command automatically take on values that represent file names or other information.  Here is a listing of all the special field characters that may be used in CT pop-up menu entries.

In each of the following examples, a DOS command line is shown, to illustrate how the command would look if it were entered normally at a DOS prompt.  After that, the CTSHELL.INI entry is shown that would produce that command, substituting current information for the CT special characters.


Current Filename
!

The exclamation point translates into the current file name.  Here's an example that would use the Windows NOTEPAD.EXE editor to edit the current file:

Command line:   notepad.exe filename.ext

CT entry:	{&Edit} {} {notepad.exe} {!} {}


Complete Path of Current Filename
~

If you start a program running in another directory, then pass it a file name from the current directory, that program will assume that the file name means a file in its directory instead.  You may need a way to pass the full path of the current file to that program.

The tilde will do that, and can be used in place of the exclamation point if needed.  It translates into the current file name, complete with its full path..

Here's an example that would use the Windows NOTEPAD.EXE editor to edit the current file, assuming that C:\FOO\BAR is the current working directory:

Command line:   notepad.exe c:\foo\bar\filename.ext

CT entry:	{&Edit} {} {notepad.exe} {~} {}


List of Files that are Tagged
#

The pound sign translates into a list of files that are tagged, or as many of them as can be squeezed into the DOS limit of 127 characters on a command line.  You might like to add all of the tagged files to an archive file named ARCNAME.LZH by using the LHArc program:

Command line:	lha a arcname file1 file2 file3 ...

CT entry:	{&LHArc Add} {} {lha.exe} {a arcname #} {}

If you give CT a command this way that turns out to be longer than the allowable 127 characters, it will let you know about it and offer an opportunity for you to abort the operation or truncate the command to less than 127 characters and go ahead with it.

If asked to truncate the command and go ahead with it, CT will try to shorten it to a place where there is a space.  That way, if you are sending a number of files to an editor, for example, you won't inadvertently create a new file whose name is part of a legitimate name.

However, after such a truncation, be sure to check how many files you actually did edit, or pack into an archive, etc.  You will almost certainly need to select the remaining files and repeat the operation.


Root Name of Current File
@

The commercial at sign translates to the root filename of the current file, without any extension.  For example, if the current file were named FOO.EXE, then the {@} in a command would become FOO.

There aren't many cases when the root filename is needed, and programmers will probably find this one more useful than most other users.  For example, if the current filename is FOO.EXE, the expression {@.C} would translate to FOO.C, and the expression {@.EXE} would translate to FOO.EXE.

If you do store all your .PIF files in a special subdirectory, you can create a menu entry that will allow you to edit the PIF file for any .EXE that happens to be the current file:

Command line:	pifedit.exe \pif\filename.pif

CT entry:	{&PIFedit an EXE} {} {pifedit.exe} {\pif\@.pif} {}


Argument Entered when Program is Run
?argument?

A pair of question marks surrounds the prompt you want CT to display when it asks you for a string of characters to put in its place.  This is how you can supply variable arguments at the time an entry is executed.

For example, the LHArc command shown earlier will always create an archive called ARCNAME.LZH, because the name ARCNAME has been hard coded, or stated explicitly, in the command.  It will require that the same archive be created or updated each time this pop-up entry is executed, although the currently tagged file names may be different each time.  Compare that to this example, where CT will ask the user for an archive name each time the command is executed:

Command line:	lha a arcname file1 file2 file3 ...

CT entry:	{&LHArc Add} {} {lha.exe} {a ?Archive Name? #} {}


Environment Variable Passed as Argument
%variable%

A pair of percent signs will cause CT to insert the value for a named environment variable into the command.  This is consistent with the way environment variables can be accessed within a batch file, and the topic of environment variables is explained fully in your DOS manual.

Briefly, you set environment variables to a given value with a SET command like this:

SET ENVAR=contents of variable

Although that can be done at a DOS prompt, it is usually done in an AUTOEXEC.BAT file instead, so that your environment variables are established correctly each time you start your computer.  Programs can obtain various kinds of information from environment variables, and the documentation for those programs will tell you how to set them, if any are needed.

When used in a CT pop-up entry, the two percent signs and the variable name that is between them are replaced by the value that DOS associates with that environment variable.

For example, a programmer might want an easy way to insert object modules that are being created (parts of programs) into a library named FOO.LIB, and which is located in the directory pointed to by the LIB environment variable.  It is assumed that the current file will be an object module, a file ending with the extension .OBJ.  This example assumes that the environment variable currently contains the value C:\LIB and that the current file name is BAR.OBJ:

Command line:	lib C:\LIB\FOO +BAR.OBJ;

CT entry:	{Add &Module} {} {lib} {%LIB%\FOO +!;} {}


Marking INI File Line as Comment
;  Comments

The semicolon is not a character that takes on a special meaning inside a field, but a character that can be used to temporarily turn an entry into a comment.  To be used that way, it must appear in the first position on a line.

Normally, any text in the Items section of your INI file that is not enclosed in braces is considered to be comments, and is ignored by CT-Shell.  Sometimes, however, you might like to turn an entire line into a comment, fields and all, so that you can leave that line in your CTSHELL.INI file and still have CT ignore it.